package com.xujiang.myblog.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xujiang.myblog.R;
import com.xujiang.myblog.entity.UserFragmentNestEntity;

import java.util.List;

/**
 * Created by xujiang on 2017/4/17.
 */

public class NestAdapter extends BaseQuickAdapter<UserFragmentNestEntity,BaseViewHolder> {

    public NestAdapter(int layoutResId, List<UserFragmentNestEntity> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, UserFragmentNestEntity item) {
        Glide.with(mContext).load(item.getUrlimage()).into((ImageView)helper.getView(R.id.image_item_nest_userfragment));
        helper.setText(R.id.title_item_nest_userfragment,item.getTitle());
        helper.setText(R.id.subtitile_item_nest_userfragment,item.getSubtitle());
        Glide.with(mContext).load(item.getUrlimage()).into((ImageView)helper.getView(R.id.imageend_item_nest_userfragment));

    }


}
